@extends('Home.Layout.Layout')
@section('title','个人中心')
@section('con')
<br>
<br>
<div style="position:absolute; left:10px">
<ul class="nav nav-pills" role="tablist">
  <li role="presentation" class="active"><a href="#">个人中心首页</a></li>
  <li role="presentation"><a href="#">签到/抽奖</a></li>
  <li role="presentation"><a href="{{asset('/home/cart/index')}}">我的购物车</a></li>  
  <li role="presentation"><a href="{{asset('/home/goods/collect')}}">我的收藏</a></li>
  <li role="presentation"><a href="{{asset('/home/order/edit')}}">我的订单</a></li>
  
</ul>
</div>
<br>
<br>
<div class="col-md-4 col-md-offset-3 account-left">
					<form action="{{url('/home/user/update')}}" method="post" enctype="multipart/form-data" >
					<div class="account-top heading">
						<h3>个人信息</h3>
					</div>
					@if (count($errors) > 0)
					    <div class="alert alert-danger">
					        <ul>
					            @foreach ($errors->all() as $error)
					                <li>{{ $error }}</li>
					            @endforeach
					        </ul>
					    </div>
					@endif
					<div class="address">
						<span>用户名</span>
						<input type="text"  name="username" value="{{$user->username}}">
					</div>
					
					<div class="address">
						<span>手机号</span>
						<input type="text" name="phone"  value="{{$user->phone}}">
					</div>
					<div class="address">
						<span>收货地址</span>
						<input type="text" name="addr"  value="{{$user->addr}}">
					</div>
					
					<div class="address">
						<span>邮箱</span>
						<input type="text" name= "email" value="{{$user->email}}">
					</div>
					<div class="address">
						<span>头像</span>
						<input type="file" name="pic">
						<img src="{{$user->pic}}" width="100px">  
					</div>
					<input type="hidden" name="id" value="{{$user->id}}">
					<div class="address new">
						<input type="submit" value="修改">
					</div>
					{{csrf_field()}}    
					</form>
				</div>
@endsection